cc.Class({
    extends: cc.Component,
    properties: {
        gameName: cc.Label,
        gameSprite: cc.Sprite,
        bg: cc.Node
    },
    init: function (t) {
        this.appid = t.appid, t.width && (this.node.scale = t.width / this.node.width, this.node.width = t.width,
                this.node.height *= this.node.scale), this.gameName.string = t.name, this.gameSprite.spriteFrame = t.spriteFrame,
            this.qrcode = t.qrcode, this.btnCallback = t.btnCallback;
    },
    setSpriteFrame: function (t) {
        this.gameSprite.spriteFrame = t;
    },
    btn: function () {
        this.btnCallback && this.btnCallback({
            name: this.gameName.string,
            appid: this.appid,
            qrcode: this.qrcode
        });
    }
})